	//
	//  JsRequestManager.h
	//
	//  Created by Gikki Ares on 2020/12/31.
	//
#import <Foundation/Foundation.h>
#import "JsRequestManagerInterface.h"
#import "JsRequestConfig.h"
#import "JsRequestBuilder.h"
#import "JsRequestBaseData.h"


NS_ASSUME_NONNULL_BEGIN


	//@class GaoRequestManager;
	//@protocol GaoRequestManagerDelegate <NSObject>
	//- (void)gaoRequestManager:(GaoRequestManager *)manager finishRequest:(NSURLRequest *)reqeust detail:(NSString *)reqeustDetail;
	//@end


@interface JsRequestManager : NSObject<JsRequestManagerInterface>

@property (nonatomic,strong) NSString * serverAddress;
@property (nonatomic,assign) BOOL isGenerateDetailString;

	//设置事件的代理对象和函数.
	//selector需要能够接受3个参数  int:NSString:NSString:
	//这种方式的优点是使用类方法就能设置.
- (void) setEventTarget:(id)target action:(SEL)action;

+ (JsRequestManager *)sharedInstance;

#pragma mark  01 get urlencode
// http://www.xx.com?param1=value1
- (NSURLSessionDataTask *)getRequestWithRequestConfig:(JsRequestConfig *) config
												  completion:(ResponseHandler)completion;


#pragma mark 02 post
#pragma mark 0201 post application/json
- (NSURLSessionDataTask *)postRequestByJsonWithRequestConfig:(JsRequestConfig *) config
												  completion:(ResponseHandler)completion;


@end

NS_ASSUME_NONNULL_END
